
const _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault');

exports.__esModule = true;
exports.default = void 0;

const _extends2 = _interopRequireDefault(require('@babel/runtime/helpers/extends'));

const _babelHelperVueJsxMergeProps = _interopRequireDefault(require('@vue/babel-helper-vue-jsx-merge-props'));

const _utils = require('../utils');

const _functional = require('../utils/functional');

const _cell = _interopRequireDefault(require('../cell'));

const _switch = _interopRequireDefault(require('../switch'));

const _shared = require('../switch/shared');

// Utils
// Components
const _createNamespace = (0, _utils.createNamespace)('switch-cell');
const createComponent = _createNamespace[0];
const bem = _createNamespace[1];

function SwitchCell(h, props, slots, ctx) {
  return h(_cell.default, (0, _babelHelperVueJsxMergeProps.default)([{
    attrs: {
      center: true,
      size: props.cellSize,
      title: props.title,
      border: props.border,
    },
    class: bem([props.cellSize]),
  }, (0, _functional.inherit)(ctx)]), [h(_switch.default, {
    props: (0, _extends2.default)({}, props),
    on: (0, _extends2.default)({}, ctx.listeners),
  })]);
}

SwitchCell.props = (0, _extends2.default)({}, _shared.switchProps, {
  title: String,
  cellSize: String,
  border: {
    type: Boolean,
    default: true,
  },
  size: {
    type: String,
    default: '24px',
  },
});

const _default = createComponent(SwitchCell);

exports.default = _default;
